package org.xjk;

import com.beust.jcommander.Parameter;

/**
 * Copyright (c) 2010, 2024, xjk All rights reserved.
 *
 * @author caozj thucaozj@outlook.com
 * @version 1.0
 * @date 2024-08-19
 * @since 20
 */

public class AppConfig {
    @Parameter(names = "-m", description = "app mode: encode or decode",order = 0)
    private String  mode = "encode";

    @Parameter(names = "-i", description = "input file or directory contains encoding files",required = true,order = 1)
    private String inputFile;

    @Parameter(names = "-o", description = "output file or directory",required = true,order = 2)
    private String outputFile;

    @Parameter(names = "-c", description = "count of split parts,only need by encode mode",order = 3)
    private Integer count=10;

    @Parameter(names = {"-h", "--help"}, help = true, description = "show help",order = 4, hidden = false)
    private boolean help;

    @Parameter(names = "-p", description = "password",order = 5,required = true,password = true)
    private String password;

    @Parameter(names = "-l", description = "log path",order = 6)
    private String logPath="log.txt";

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public String getInputFile() {
        return inputFile;
    }

    public void setInputFile(String inputFile) {
        this.inputFile = inputFile;
    }

    public String getOutputFile() {
        return outputFile;
    }

    public void setOutputFile(String outputFile) {
        this.outputFile = outputFile;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public boolean isHelp() {
        return help;
    }

    public void setHelp(boolean help) {
        this.help = help;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public String getLogPath() {
        return logPath;
    }

    public void setLogPath(String logPath) {
        this.logPath = logPath;
    }
}
